<?php
# idxCMS Flat Files Content Management System v5.0
# Copyright (c) 2011-2016 Victor Nabatov greenray.spb@gmail.com
# BBCODES PANEL

die();?>

<script type="text/javascript" src="{TOOLS}bbcodes.js"></script>
<div class="bbcodes center">
    <select class="bbselect" onchange="GetFromDropDown(value,'typeface','$area');" name="fontface">
        <option value="">__Font__</option>
        <option style="font-family:arial;" value="arial">Arial</option>
        <option style="font-family:courier;" value="courier">Courier</option>
        <option style="font-family:garamond;" value="garamond">Garamond</option>
        <option style="font-family:helvetica;" value="helvetica">Helvetica</option>
        <option style="font-family:times;" value="times">Times</option>
        <option style="font-family:verdana;" value="verdana">Verdana</option>
        <option style="font-family:mono;" value="mono">Mono</option>
    </select>
    <select class="bbselect" onchange="GetFromDropDown(value, 'size', '$area');" name="fontsize">
        <option value="">__Size__</option>
        <option style="font-size:8px;" value="8">8px</option>
        <option style="font-size:9px;" value="9">9px</option>
        <option style="font-size:10px;" value="10">10px</option>
        <option style="font-size:11px;" value="11">11px</option>
        <option style="font-size:12px;" value="12">12px</option>
        <option style="font-size:13px;" value="13">13px</option>
        <option style="font-size:14px;" value="14">14px</option>
    </select>
    <br />
    <button type="button" class="bbbutton" onclick="CreateBBTag('[b]','[/b]','$area');">
        <img src="[$bbimg]bold.gif" name="bold" title="__Bold__" width="20" height="20" alt="B" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[i]','[/i]','$area');">
        <img src="[$bbimg]italic.gif" name="italic" title="__Italic__" width="20" height="20" alt="I" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[u]','[/u]','$area');">
        <img src="[$bbimg]underline.gif" name="underline" title="__Underline__" width="20" height="20" alt="U" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[s]','[/s]','$area');">
        <img src="[$bbimg]strikethrough.gif" name="strikethrough" title="__Strikethrough__" width="20" height="20" alt="S" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[sub]','[/sub]','$area');">
        <img src="[$bbimg]subscript.gif" name="subscript" title="__Subscript__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[sup]','[/sup]','$area');">
        <img src="[$bbimg]superscript.gif" name="superscript" title="__Superscript__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[left]','[/left]','$area');">
        <img src="[$bbimg]left.gif" name="left" title="__Left__" width="20" height="20" alt="L" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[center]','[/center]','$area');">
        <img src="[$bbimg]center.gif" name="center" title="__Center__" width="20" height="20" alt="C" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[right]','[/right]','$area');">
        <img src="[$bbimg]right.gif" name="right" title="__Right__" width="20" height="20" alt="R" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[justify]','[/justify]','$area');">
        <img src="[$bbimg]justify.gif" name="justify" title="__Justify__" width="20" height="20" alt="J" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[indent]','[/indent]','$area');">
        <img src="[$bbimg]indent.gif" name="indent" title="__Indent__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[outdent]','[/outdent]','$area');">
        <img src="[$bbimg]outdent.gif" name="outdent" title="__Outdent__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[hr]','','$area');">
        <img src="[$bbimg]hr.gif" name="hr" title="__Hor__" width="20" height="20" alt="_" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[p]','[/p]','$area');">
        <img src="[$bbimg]p.gif" name="p" title="__Paragraph__" width="20" height="20" alt="P" />
    </button>
    <button type="button" class="bbbutton" onclick="AddList('[ul]','$area');">
        <img src="[$bbimg]bullist.gif" name="ul" title="__Bullets__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="AddList('[ol]','$area');">
        <img src="[$bbimg]numlist.gif" name="ol" title="__Numbered list__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="ChooseColor('color', '$area');">
        <img src="[$bbimg]color.gif" name="color" title="__Color__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="ChooseColor('bgcolor', '$area');">
        <img src="[$bbimg]backcolor.gif" name="bgcolor" title="__Background__" width="20" height="20" alt="" />
    </button>
    <!-- IF !empty($full) -->
        <br />
        <button type="button" class="bbbutton" onclick="CreateBBTag('[spoiler]','[/spoiler]','$area');">
            <img src="[$bbimg]spoiler.gif" name="spoiler" title="__Spoiler__" width="20" height="20" alt="" />
        </button>
        <button type="button" class="bbbutton" onclick="ShowForm('image_$area');">
            <img src="[$bbimg]image.gif" name="image" title="__Image__" width="20" height="20" alt="" />
        </button>
        <button type="button" class="bbbutton" onclick="AddUrl('url','$area');">
            <img src="[$bbimg]link.gif" name="link" title="__URL__" width="20" height="20" alt="" />
        </button>
        <button type="button" class="bbbutton" onclick="AddUrl('email','$area');">
            <img src="[$bbimg]email.gif" name="email" title="__Email__" width="20" height="20" alt="" />
        </button>
    <!-- END -->
    <button type="button" class="bbbutton" onclick="CreateBBTag('[code]','[/code]','$area');">
        <img src="[$bbimg]code.gif" name="code" title="__Code__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[php]','[/php]','$area');">
        <img src="[$bbimg]php.gif" name="php" title="__PHP__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[html]','[/html]','$area');">
        <img src="[$bbimg]html.gif" name="html" title="__HTML__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[quote]','[/quote]','$area');">
        <img src="[$bbimg]quote.gif" name="quote" title="__Quote__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onmouseover="CheckSelection();" onclick="AddQuote(document.forms['$form'].elements['$area']);">
        <img src="[$bbimg]quote_selected.gif" name="quote_selected" title="__Quote selectd__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="CreateBBTag('[offtopic]','[/offtopic]','$area');">
        <img src="[$bbimg]offtopic.gif" name="offtopic" title="__Off Topic__" width="20" height="20" alt="" />
    </button>
    <!-- IF !empty($full) -->
        <button type="button" class="bbbutton" onclick="AddUrl('mp3','$area');">
            <img src="[$bbimg]mp3.gif" name="mp3" title="__MP3__" width="20" height="20" alt="" />
        </button>
        <button type="button" class="bbbutton" onclick="CreateBBTag('[youtube]','[/youtube]','$area');">
            <img src="[$bbimg]youtube.gif" name="youtube" title="__YouTube__" width="20" height="20" alt="" />
        </button>
    <!-- END -->
    <button type="button" class="bbbutton" onclick="ShowForm('smiles_$area');">
        <img src="[$bbimg]smiles.gif" name="smiles" title="__Smiles__" width="20" height="20" alt="" />
    </button>
    <!-- IF !empty($moderator) -->
        <button type="button" class="bbbutton" onclick="CreateBBTag('[note]','[/note]','$area');">
            <img src="[$bbimg]note.png" name="note" title="__Note__" width="20" height="20" alt="" />
        </button>
    <!-- END -->
    <button type="button" class="bbbutton" onclick="Preview('$area','{MODULE}editor');">
        <img src="[$bbimg]preview.gif" name="preview" title="__Preview__" width="20" height="20" alt="" />
    </button>
    <button type="button" class="bbbutton" onclick="RemoveBBTag('$area');">
        <img src="[$bbimg]cleanup.gif" name="remove" title="__Remove BBcodes__" width="20" height="20" alt="" />
    </button>
    <!-- IF !empty($full) -->
        <div id="image_$area" unselectable="on" class="bbtools" style="display:none;">
            <div class="img">__Link__ (URL): <input type="text" id="image_url_$area" size="50" /></div>
            <p>
                <input type="button" onclick="OpenBrowseWin('$area','$path');" value="__Choose__" />
                <input type="button" onclick="InsertImage('$area');HideDialog('image_$area');" value="__Insert__" />
                <input type="button" onclick="HideDialog('image_$area');" value="__Cancel__" />
            </p>
        </div>
        <div id="link_$area" unselectable="on" class="bbtools" style="display:none;">
            <input type="hidden" id="type_$area" value="" />
            <div class="link_text">__Link__ (URL): <input type="text" id="url_$area" size="50" value="" /></div>
            <div id="label_$area" class="link_text" style="display:none;">__Text__: <input type="text" id="txt_$area" size="50" value="" /></div>
            <p>
                <input type="button" onclick="InsertLink('$area');HideDialog('link_$area');" value="__Insert__" />
                <input type="button" onclick="HideDialog('link_$area');" value="__Cancel__" />
            </p>
        </div>
    <!-- END -->
    <div id="color_$area" unselectable="on" class="bbtools" style="display:none;">
        <input type="hidden" id="cmd_$area" value="" />
        <div style="background:black;margin:0 0 0 20px;padding:1px;height:22px;width:125px;float:left;">
            <div id="preview_$area" class="red" style="height:100%;width:100%;"></div>
        </div>
        <input type=text id="clr_val_$area" value="black" size="17" onpaste="ViewColor('', '$area');" onblur="ViewColor('', '$area');" />
        <input type="button" onmouseover="ViewColor('', '$area');" onclick="SetColor('', '$area');HideDialog('color_$area');" value="__OK__" />
        <input type="button" onclick="HideDialog('color_$area');" value="__Cancel__" />
        <br />
        __Choose color or enter a__ <a href="http://en.wikipedia.org/wiki/Web_colors" target="_blank">__color name__</a>
        <br clear=all />
        <table width="480">
        <!-- FOREACH $colors -->
            <tr>
            <!-- FOREACH $colors.colors -->
                <td style="background:#$colors.color;height:12px;width:12px;" onmouseover="ViewColor('#$colors.color', '$area');" onclick="SetColor('#$colors.color', '$area');"></td>
            <!-- END -->
            </tr>
        <!-- END -->
        </table>
    </div>
    <div id="smiles_$area" unselectable="on" class="bbtools" style="display:none;">
    <!-- FOREACH $smiles -->
        <img src="{SMILES}$smiles.smile" alt="$smiles.smile" onclick="SetSmile('[$smiles.smile]','$area');HideDialog('smiles_$area');" />
    <!-- END -->
    </div>
</div>
